<template>
	<view class="">
		<view class="page" v-if="order.status == 0">
			<view class="box_13">
				<map v-if="order.status == 0" class="group_22" :latitude="map.latitude" :longitude="map.longitude"
					:scale="map.scale" :polyline="map.polyline" :markers="map.covers">
					<view class="group_22">

						<view class="group_1">
							<view class="box_14">
								<view class="section_7">
									<view class="endAdress">
										<view class="end1">
											去
										</view>
										<view class="end2">
											{{ order.start }}
										</view>
									</view>
									<!-- 									<view class="group_23">
										<text lines="1" class="text_1">123去</text>
										<view class="text-wrapper_1">
											<text lines="1" class="text_2 ">{{ order.start }}</text>
										</view>
									</view> -->
									<view class="text-wrapper_2">
										<text lines="1" class="text_5">请</text>
										<text lines="1" class="text_6">在</text>
										<text lines="1" class="text_7">{{dateFormat(date)}}</text>
										<text lines="1" class="text_8">前到达代</text>
										<text lines="1" class="text_9">驾</text>
										<text lines="1" class="text_10">地点</text>
									</view>
								</view>
								<view class="image-text_5" @click="getwich()">
									<image src="/static/组 32@3x.png" class="icon_1"></image>
									<view class="text-group_1">
										<text lines="1" class="text_11">导</text>
										<text lines="1" class="text_12">航</text>
									</view>
								</view>
							</view>
							<view class="box_15">
								<view class="text-wrapper_3">
									<text lines="1" class="text_13">剩余</text>
									<text lines="1" class="text_14">{{actual.distance|kilometer}}</text>
									<text lines="1" class="text_15">公里</text>
								</view>
								<view class="text-wrapper_4">

								</view>
							</view>
						</view>
						<view class="block_10">


						</view>

					</view>
				</map>

				<view class="box_4">
					<view class="section_8">
						<text lines="1" class="text_24"></text>
						<view class="section_9">
							<view class="block_3"></view>
							<view class="block_4"></view>
						</view>
						<view class="section_10">
							<view class="text-wrapper_6">
								<view class="box123">{{ order.start }}</view>
							</view>
							<view class="text-wrapper_6">
								<view lines="1" class="text_31">{{ order.end  }}</view>
							</view>
						</view>
						<view class="icon_4" @tap="callPhone(order.mobile)">
							<image src="https://www.yandaijia.cn/uploads/static/209%E7%94%B5%E8%AF%9D(1)@2x.png"
								class="thumbnail_1"></image>
						</view>
						<view class="icon_4">
							<image
								src="https://www.yandaijia.cn/uploads/static/%E6%B6%88%E6%81%AF-%E7%BD%AE%E7%81%B0.png"
								class="label_2" @click="handleRoute('C2C'+order.user.mobile)"></image>
						</view>
					</view>
					<view v-if="order" class="button_1" style='background:#FA4F50'>
						<view class="text-group_6">
							<text lines="1" class="text-wrapper_7" @tap="taking(order.id)">立即抢单 </text>
						</view>
					</view>
				</view>

			</view>
		</view>
		<view class="page" v-if="order.status == 1">
			<view class="box_13">
				<map v-if="order.status == 2 || order.status == 1 || order.status == 4" class="group_22"
					:latitude="map.latitude" :longitude="map.longitude" :scale="map.scale" :polyline="map.polyline"
					:markers="map.covers">
					<view class="group_22">

						<view class="group_1">
							<view class="box_14">
								<view class="section_7">
									<view class="endAdress">
										<view class="end1">
											去
										</view>
										<view class="end2">
											{{ order.start }}
										</view>
									</view>

									<view class="text-wrapper_2">
										<text lines="1" class="text_5">请</text>
										<text lines="1" class="text_6">在</text>
										<text lines="1" class="text_7">{{dateFormat(date)}}</text>
										<text lines="1" class="text_8">前到达代</text>
										<text lines="1" class="text_9">驾</text>
										<text lines="1" class="text_10">地点</text>
									</view>
								</view>
								<view class="image-text_5" @click="getwich()">
									<image src="/static/组 32@3x.png" class="icon_1"></image>
									<view class="text-group_1">
										<text lines="1" class="text_11">导</text>
										<text lines="1" class="text_12">航</text>
									</view>
								</view>
							</view>
							<view class="box_15">
								<view class="text-wrapper_3">
									<text lines="1" class="text_13">剩余</text>
									<text lines="1" class="text_14">{{actual.distance|kilometer}}</text>
									<text lines="1" class="text_15">公里</text>
								</view>
								<view class="text-wrapper_4">

								</view>
							</view>
						</view>
						<view class="block_10">


						</view>
						<view class="group_4" v-if="order.driver_number>1"
							@tap="navigateTo('/pagesA/order-deatil/drverorderDeatil?order_id=' + order.id)">
							<view class="icon_3">
								<image src="https://www.yandaijia.cn/uploads/static/%E7%94%A8%E6%88%B7%E7%BB%84@3x.png"
									class="label_1"></image>
							</view>
							<text lines="1" class="text_23">联系其他司机</text>
						</view>
					</view>
				</map>

				<view class="box_4">
					<view class="section_8">
						<text lines="1" class="text_24"></text>
						<view class="section_9">
							<view class="block_3"></view>
							<view class="block_4"></view>
						</view>
						<view class="section_10">
							<view class="text-wrapper_6">
								<view class="box123">{{ order.start }}</view>
							</view>
							<text lines="1" class="text-end">{{ order.end  }}</text>
							<!-- <text lines="1" class="text_31">{{ order.end  }}</text> -->
						</view>
						<view class="icon_4" @tap="callPhone(order.mobile)">
							<image src="https://www.yandaijia.cn/uploads/static/209%E7%94%B5%E8%AF%9D(1)@2x.png"
								class="thumbnail_1"></image>
						</view>
						<view class="icon_4">
							<image
								src="https://www.yandaijia.cn/uploads/static/%E6%B6%88%E6%81%AF-%E7%BD%AE%E7%81%B0.png"
								class="label_2" @click="handleRoute('C2C'+order.user.mobile)"></image>
						</view>
					</view>
					<view class="button_1" :style="{'background':color}" @tap="reach()">
						<view class="text-group_6">
							<text lines="1" class="text-wrapper_7">到达出发地</text>
							<view class="text-wrapper_8">
								<text lines="1" class="text_37">已用</text>
								<text lines="1" class="text_38">时</text>
								<text lines="1" decode="true" class="text_39">{{startQd}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="page" v-if="order.status == 4">
			<view class="box_13">
				<map v-if="order.status == 2 || order.status == 1 || order.status == 4" class="group_22"
					:latitude="map.latitude" :longitude="map.longitude" :scale="map.scale" :polyline="map.polyline"
					:markers="map.covers">
					<view class="group_22">

						<view class="group_1" style="background-color: rgba(255, 255, 255, 0);">
							<view class="box_14">


							</view>
							<view class="box_15">


							</view>
						</view>
						<view class="block_10">


						</view>
						<view class="group_4" v-if="order.driver_number>1"
							@tap="navigateTo('/pagesA/order-deatil/drverorderDeatil?order_id=' + order.id)">
							<view class="icon_3">
								<image src="https://www.yandaijia.cn/uploads/static/%E7%94%A8%E6%88%B7%E7%BB%84@3x.png"
									class="label_1"></image>
							</view>
							<text lines="1" class="text_23">联系其他司机</text>
						</view>
					</view>
				</map>

				<view class="box_4">
					<view class="section_8">
						<text lines="1" class="text_24"></text>
						<view class="section_9">
							<view class="block_3"></view>
							<view class="block_4"></view>
						</view>
						<view class="section_10">
							<view class="text-wrapper_6">
								<view class="box123">{{ order.start }}</view>
							</view>
							<text lines="1" class="text-end">{{ order.end  }}</text>
						</view>
						<view class="icon_4" @tap="callPhone(order.mobile)">
							<image src="https://www.yandaijia.cn/uploads/static/209%E7%94%B5%E8%AF%9D(1)@2x.png"
								class="thumbnail_1"></image>
						</view>
						<view class="icon_4">
							<image
								src="https://www.yandaijia.cn/uploads/static/%E6%B6%88%E6%81%AF-%E7%BD%AE%E7%81%B0.png"
								class="label_2" @click="handleRoute('C2C'+order.user.mobile)"></image>
						</view>
					</view>
					<view class="button_1" :style="{'background':color}" @tap="start()">
						<view class="text-group_6">
							<text lines="1" class="text-wrapper_7">开始服务</text>
							<view class="text-wrapper_8">
								<text lines="1" class="text_37">已用</text>
								<text lines="1" class="text_38">时</text>
								<text lines="1" decode="true" class="text_39">{{startDd}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="page" v-if="order.status == 2">
			<view class="box_13">
				<map v-if="order.status == 2 || order.status == 1 || order.status == 4" class="group_22"
					:latitude="map.latitude" :longitude="map.longitude" :scale="map.scale" :polyline="map.polyline"
					:markers="map.covers">
					<view class="group_22">

						<view class="group_1" style="background-color: rgba(255, 255, 255, 0);">
							<view class="box_14">


							</view>
							<view class="box_15">


							</view>
						</view>
						<view class="block_10">


						</view>
						<view class="group_4" v-if="order.driver_number>1"
							@tap="navigateTo('/pagesA/order-deatil/drverorderDeatil?order_id=' + order.id)">
							<view class="icon_3">
								<image src="https://www.yandaijia.cn/uploads/static/%E7%94%A8%E6%88%B7%E7%BB%84@3x.png"
									class="label_1"></image>
							</view>
							<text lines="1" class="text_23">联系其他司机</text>
						</view>
					</view>
				</map>

				<view class="box_4">
					<view class="section_8">
						<text lines="1" class="text_24"></text>
						<view class="section_9">
							<view class="block_3"></view>
							<view class="block_4"></view>
						</view>
						<view class="section_10">
							<view class="text-wrapper_6">
								<view class="box123">{{ order.start }}</view>
							</view>
							<text lines="1" class="text-end">{{ order.end  }}</text>
						</view>
						<view class="icon_4" @tap="callPhone(order.mobile)">
							<image src="https://www.yandaijia.cn/uploads/static/209%E7%94%B5%E8%AF%9D(1)@2x.png"
								class="thumbnail_1"></image>
						</view>
						<view class="icon_4">
							<image
								src="https://www.yandaijia.cn/uploads/static/%E6%B6%88%E6%81%AF-%E7%BD%AE%E7%81%B0.png"
								class="label_2" @click="routerdetail('C2C'+order.user.mobile)"></image>
						</view>
					</view>
					<view class="button_1" :style="{'background':color}" @tap="done()">
						<view class="text-group_6">
							<text lines="1" class="text-wrapper_7">已到达目的地</text>
							<view class="text-wrapper_8">
								<text lines="1" class="text_37">已用</text>
								<text lines="1" class="text_38">时</text>
								<text lines="1" decode="true" class="text_39">{{endDd}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="done">
			<view v-if="order.status == 3">
				<view class="bc">
					<view class="border_style">
						<view class="span_bc"> </view><text style="float: left;font-size: 1.2rem">订单金额</text>
					</view>
					<view class="input_style">
						<input type="text" placeholder="输入金额" class="input" v-model="price" />
						<span class="yuan">元</span>
					</view>
					<view style="height: 2.5rem;">
						<view class="span_bc"> </view><text style="float: left;font-size: 1.2rem">订单详情</text>
					</view>
					<view class="xq_style">

						<view>
							<view>用时{{endDd}}</view>
						</view>
					</view>
					<view style="height: 3rem;"></view>
				</view>

				<button class="button_style" @click="pay()">确认</button>
			</view>
			<view class="index" v-if="order.status == -1">
				<view class="top">
					<text>订单已被取消</text>
				</view>
				<view class="center">
					<view class="left">
						<view>
							<text class="icon green">&#xe608;</text>
							<text class="gray">从</text>
							{{ order.start_address }}
						</view>
						<view>
							<text class="icon orange">&#xe608;</text>
							<text class="gray">到</text>
							{{ order.end_address }}
						</view>
					</view>
					<!--          <text class="right icon gray">&#xe60f;</text> -->
				</view>
				<view @tap="backto()"
					style="width: 60%;height: 3rem;background-color: #3294FF;color: #fff;text-align: center;font-size: 40rpx;font-weight: 500;line-height: 3rem;margin: 2rem auto;border-radius: 20rpx;">
					返回
				</view>
				<view class="qrimg">
					<tki-qrcode ref="qrcode" :onval="true" :size="400" :val="paystr" />
				</view>

			</view>
			<view class="index" v-if="order.status == 99">
				<view class="top">
					<view class="user">
						<image :src="order.user.avatar" mode=""></image>
						<text>{{ order.user.nickname }}</text>
					</view>
					<text>{{ order.end_datetime }}</text>
				</view>
				<view class="center">
					<view class="left">
						<view>
							<text class="icon green">&#xe608;</text>
							<text class="gray">从</text>
							{{ order.start_address }}
						</view>
						<view>
							<text class="icon orange">&#xe608;</text>
							<text class="gray">到</text>
							{{ order.end_address }}
						</view>
					</view>
					<!--          <text class="right icon gray">&#xe60f;</text> -->
				</view>

				<view class="qrimg">
					<tki-qrcode ref="qrcode" :onval="true" :size="400" :val="paystr" />
				</view>
			</view>
			<!-- <view class="index" v-if="order.status == 3&&is_show==false">
				<view class="top">
					<view class="user">
						<image :src="order.user.avatar" mode=""></image>
						<text>{{ order.user.nickname }}</text>
					</view>
					<text>{{ order.end_datetime }}</text>
				</view>
				<view class="center">
					<view class="left">
						<view>
							<text class="icon green">&#xe608;</text>
							<text class="gray">从</text>
							{{ order.start_address }}
						</view>
						<view>
							<text class="icon orange">&#xe608;</text>
							<text class="gray">到</text>
							{{ order.end_address }}
						</view>
					</view>
				</view>
				<view class="money" >
					
					<text class="t2">{{ order.distance | kilometer }}公里 {{ order.duration | duration }}</text>
					<text class="t3"></text>
					
				</view>
				<view>
					
				</view>
			</view> -->
			<uni-popup ref="popup" type="center" style="top: 0;" :mask-click="false">
				<view class="popcenter" style="width: 500rpx;height: 100%;">
					<view class="" style="height: 100%;  width: 100%;">
						<text>平台抽查</text>
						<view v-if="imagURL===''" class="shot_image" @click="shoot()">
							<img src="./image/shot.png" alt="">
						</view>
						<view v-else class="shot_image" @click="shoot()">
							<img :src="imagURL" alt="">
						</view>
						<text style="color: #C5C5C5; font-size: 24rpx;">请点击相机按钮，检查仪容仪表</text> </br>
						<text style="color: #D77B65; font-size: 24rpx;">请穿戴整齐后拍照</text>
					</view>
					<button class="shot" style="width: 80%;" @click="close()">提交</button>
				</view>
			</uni-popup>
		</view>
	</view>
</template>

<script>
	// const qiniuUploader = require("../../common/utils/qiniuUploader");
	import utils from "./utils/util";
	// const qiniuUploader = require("../../common/utils/qiniuUploader");
	import qiniuUploader from './utils/qiniuUploader'
	// import qiniuUploader from "../../common/utils/qiniuUploader";
	import QQMapWX from '../../libs/qqmap-wx-jssdk/qqmap-wx-jssdk.js';
	// import tkiQrcode from '../components/tki-qrcode/tki-qrcode.vue';
	import helper from '../../common/helper.js';
	import api from '../../common/api.js';
	import uniPopup from '@/components/uni-popup/uni-popup.vue';
	import util from "./utils/util";
	const recorderManager = uni.getRecorderManager();
	const innerAudioContext = uni.createInnerAudioContext();

	function initQiniu() {
		var options = {
			// bucket所在区域，这里是华北区。ECN, SCN, NCN, NA, ASG，分别对应七牛云的：华东，华南，华北，北美，新加坡 5 个区域
			region: 'NCN',

			// 获取uptoken方法三选一即可，执行优先级为：uptoken > uptokenURL > uptokenFunc。三选一，剩下两个置空。推荐使用uptokenURL，详情请见 README.md
			// 由其他程序生成七牛云uptoken，然后直接写入uptoken
			uptoken: '',
			// 从指定 url 通过 HTTP GET 获取 uptoken，返回的格式必须是 json 且包含 uptoken 字段，例如： {"uptoken": "0MLvWPnyy..."}
			uptokenURL: '',
			// uptokenFunc 这个属性的值可以是一个用来生成uptoken的函数，详情请见 README.md
			uptokenFunc: function() {},

			// bucket 外链域名，下载资源时用到。如果设置，会在 success callback 的 res 参数加上可以直接使用的 fileURL 字段。否则需要自己拼接
			domain: 'https://qiniu.yandaijia.cn',
			// qiniuShouldUseQiniuFileName 如果是 true，则文件的 key 由 qiniu 服务器分配（全局去重）。如果是 false，则文件的 key 使用微信自动生成的 filename。出于初代sdk用户升级后兼容问题的考虑，默认是 false。
			// 微信自动生成的 filename较长，导致fileURL较长。推荐使用{qiniuShouldUseQiniuFileName: true} + "通过fileURL下载文件时，自定义下载名" 的组合方式。
			// 自定义上传key 需要两个条件：1. 此处shouldUseQiniuFileName值为false。 2. 通过修改qiniuUploader.upload方法传入的options参数，可以进行自定义key。（请不要直接在sdk中修改options参数，修改方法请见demo的index.js）
			// 通过fileURL下载文件时，自定义下载名，请参考：七牛云“对象存储 > 产品手册 > 下载资源 > 下载设置 > 自定义资源下载名”（https://developer.qiniu.com/kodo/manual/1659/download-setting）。本sdk在README.md的"常见问题"板块中，有"通过fileURL下载文件时，自定义下载名"使用样例。
			shouldUseQiniuFileName: false
		};
		// 将七牛云相关配置初始化进本sdk
		qiniuUploader.init(options);
	}
	// const recorderManager = uni.getRecorderManager()
	innerAudioContext.autoplay = true;
	export default {
		components: {

			uniPopup
		},
		data() {
			return {
				startFw: '00:00:00',
				startQd: '00:00:00',
				startDd: '00:00:00',
				endDd: '00:00:00',
				imagURL: "",
				date: new Date().toISOString(),
				showCouponNew: false,
				currenttime: "",
				flag: null,
				hour: 0,
				order: "",
				timestamp: "",
				begin_time: false,
				daoda_time: false,
				end_time: false,
				minute: 0,
				second: 0,
				aa: "00:00:00",
				time: "00:00:00",
				time1: "00:00:00",
				test_s: 0,
				test_m: 0,
				test_h: 0,
				test_s1: 0,
				test_m1: 0,
				test_h1: 0,
				test_s2: 0,
				test_m2: 0,
				test_h2: 0,
				time2: "00:00:00",
				is_show: false,
				Token: "",
				voicePath: '',
				photo: '',
				flag1: '',
				hour1: 0,
				minute1: 0,
				second1: 0,
				flag2: "",
				hour2: 0,
				minute2: 0,
				second2: 0,
				useTime: "",
				timer: '',
				token: "",
				hour: 0,
				minutes: 0,
				seconds: 0,
				startMin: '',
				color: "#3294FF",
				place: "",
				value: "",
				map: {
					latitude: '',
					longitude: '',
					covers: [],
					scale: 16,
					polyline: []
				},
				focus: false,
				price: '',
				order: {},
				orderId: '',
				timer: '',
				isDirection: false,
				actual: {
					price: 0,
					distance: 0
				},
				route: {
					duration: '--'
				},
				paystr: '',
				bb: 0,
			};
		},


		filters: {
			kilometer: value => {
				let distance = parseFloat(value / 1000);
				return distance.toFixed(2);
			},
			duration: value => {
				if (value > 3600) {
					let h = parseInt(value / 3600);
					let s = value % 3600;
					if (s > 0) {
						return h + '小时' + parseInt(s / 60) + '分钟';
					} else {
						return h + '小时';
					}
				} else {
					return parseInt(value / 60) + '分钟';
				}
			},
			forAddress(val) {
				const address = val.substring(0, val.lastIndexOf("市") + 1) //-1为最后一个值
				return address.replace(/市/g, "...") //北京.北京
			}
		},


		onLoad(option) {
			uni.onAppHide(() => {
				console.log('页面从前台变为后台时执行, 只有在切换到后台才会输出语句')
				recorderManager.pause()
			})
			uni.onAppShow(() => {
				console.log('页面从后台切换到前台，只有切换到前台才会输出')
				recorderManager.resume()
			})
			this.stochastic()
			let that = this
			//抢单后计时
			this.begin_time = option.begin_time
			let sb = option.status
			that.auto_taking = option.auto_taking
			console.log('???', this.auto_taking);
			console.log('???', option.auto_taking);
			if (this.begin_time == 'true') {
				this.cleartime1()
				this.starts()
			} else if (that.auto_taking == 1) {
				
				uni.getStorage({
					key: 'ds',
					success: function(res) {
						that.test_s = res.data
						uni.getStorage({
							key: 'dh',
							success: function(res) {
								that.test_h = res.data
								// console.log('if0',res.data);
								uni.getStorage({
									key: 'dm',
									success: function(res) {
										that.test_m = res.data
										uni.getStorage({
											key: 'ds',
											success: function(res) {
												that.test_s = res.data
												that.beginSecond(that
													.test_s, that
													.test_m, that
													.test_h)
											}
										})
									}
								})
							}
						})
					},
					fail: function() {
						that.starts()
					}
				})
			}else if(sb == 1 ){
				console.log("that.auto_taking",that.auto_taking);
				// setTimeout(()=>{
					uni.getStorage({
						key: 'ds',
						success: function(res) {
							uni.getStorage({
								key: 'dh',
								success: function(res) {
									that.test_h = res.data
									uni.getStorage({
										key: 'dm',
										success: function(res) {
											that.test_m = res.data
											uni.getStorage({
												key: 'ds',
												success: function(res) {
													that.test_s = res.data
													that.beginSecond(that
														.test_s, that
														.test_m, that
														.test_h)
												}
											})
										},
										
									})
								},
								
							})
						},
						fail:function(){
							that.starts()
						}
					})
				// },2000)
			} else {
				// setInterval(() =>{
				// 	uni.getStorage({
				// 	 key: 'qdtime',
				// 	 success: function (res) {
				// 		that.startQd = res.data
				// 	 }
				// 	})
				// },1000)
				console.log('这儿？1');
				uni.getStorage({
					key: 'dh',
					success: function(res) {
						that.test_h = res.data
						// console.log('if0',res.data);
						uni.getStorage({
							key: 'dm',
							success: function(res) {
								that.test_m = res.data
								uni.getStorage({
									key: 'ds',
									success: function(res) {
										that.test_s = res.data
										if (that.test_s == 0) {
											uni.removeStorageSync('ds');
											uni.removeStorageSync('dm');
											uni.removeStorageSync('dh');
										} else {
											that.beginSecond(that.test_s, that.test_m,
												that.test_h)
										}

									}
								})
							}
						})
					}
				})
			}
			//点击到达出发地

			uni.getStorage({
				key: 'ddtime',
				success: function(res) {
					that.startDd = res.data
					// console.log('123000', res.data);
					if (res.data != '00:00:00') {
						uni.getStorage({
							key: 'dh1',
							success: function(res) {
								that.test_h1 = res.data
								// console.log('if0', res.data);
								uni.getStorage({
									key: 'dm1',
									success: function(res) {
										that.test_m1 = res.data
										uni.getStorage({
											key: 'ds1',
											success: function(res) {
												that.test_s1 = res.data
												// clearInterval(this.flag2)
												uni.removeStorageSync(
													'ds');
												uni.removeStorageSync(
													'dm');
												uni.removeStorageSync(
													'dh');
												that.beginSecond1(that
													.test_s1, that
													.test_m1, that
													.test_h1)
											}
										})
									}
								})
							}
						})
					}
				}
			})
			//点击开始服务

			uni.getStorage({
				key: 'endtime',
				success: function(res) {
					that.endDd = res.data
					if (res.data != '00:00:00') {
						uni.getStorage({
							key: 'dh2',
							success: function(res) {
								that.test_h2 = res.data
								// console.log('if0', res.data);
								uni.getStorage({
									key: 'dm2',
									success: function(res) {
										that.test_m2 = res.data
										uni.getStorage({
											key: 'ds2',
											success: function(res) {
												that.test_s2 = res.data
												// clearInterval(this.flag2)
												uni.removeStorageSync(
													'ds1');
												uni.removeStorageSync(
													'dm1');
												uni.removeStorageSync(
													'dh1');
												that.beginSecond2(that
													.test_s2, that
													.test_m2, that
													.test_h2)
											}
										})
									}
								})
							}
						})
					}
				}
			})


			// }
			let self = this;
			recorderManager.onStop(function(res) {
				console.log('recorder stop' + JSON.stringify(res.tempFilePath));
				self.voicePath = res.tempFilePath;
				let filePath = self.voicePath;
				console.log("上传文件", filePath)
				self.startUpload(filePath)
				// console.log("256",this.voicePath)

			});
			this.initSdk();
			this.orderId = option.order_id;
			if (helper.hasLogin()) {
				this.getOrderInfo();
			}
			let pages = getCurrentPages();
			if (pages[pages.length - 1].$vm.schoolName) {
				this.place = pages[pages.length - 1].$vm.place
			}


		},
		onReady: function() {
			this.gettoken()
		},

		onShow() {
			// this.stochastic()
			// this.closeCouponNew()
			// 如果存在订单则更新订单信息
			if (this.orderId) {
				this.getOrderInfo();
				this.getConversationList()
			}
			// this.therFun(object)
		},
		onHide() {
			// 隐藏时关闭定时器
			if (this.timer) {
				console.log('清除定时器');
				clearInterval(this.timer);
				this.timer = '';
			}
		},
		mounted() {
			let _this = this;
			setInterval(function() {
				_this.date = Date.parse(new Date());
			}, 1000);

		},
		methods: {

			// tree(data, id) {
			// 	console.log(data,88888)
			// 	for (let i = 0; i < data.length; i++) {
			// 		let item = data[i];
			// 		// console.log(item.conversationID)
			// 		if (item.conversationID == id) {
			// 			// return item;
			// 			console.log("item",item)
			// 			this.count=item.unreadCount
			// 		} else {
			// 			// item.children 不等于 undefined && item.children.length 大于 0 时
			// 			if (item.children && item.children.length > 0) {
			// 				let res = tree(item.children, id);
			// 				// 当 res = undefined 时不会进入判断中
			//                 // 也就是不会return
			// 				if (res) return res;
			// 				// console.log(666,item)
			// 			}
			// 		}
			// 		// console.log("item",data)
			// 	}

			// },

			// getConversationList() {

			// 	uni.$TUIKit.getConversationList().then(imResponse => {
			// 		this.setData({
			// 			conversationList: imResponse.data.conversationList
			// 		});
			// 		console.log("22222",this.conversationList)
			// 	// this.tree(this.conversationList,"C2C19563033900")
			// 	});
			// },
			navigateTo(url) {
				uni.navigateTo({
					url: url
				});
			},
			async taking(orderId) {
				uni.showModal({
					title: '操作提示',
					content: '确定要接单吗？',
					success: async e => {
						if (e.confirm) {
							let res = await api.orderTaking(orderId);
							helper.toast(res.msg);
							if (res.code == 1) {
								uni.navigateTo({
									url: '/pagesA/myDriving/drivingDetails?order_id=' + orderId +
										'&&begin_time=' + true
								});
							}
						}
					}
				});
			},
			shoot() {
				uni.chooseImage({
					count: 1,
					sizeType: ['original', 'compressed'],
					sourceType: ['camera', 'album'], //这要注意，camera掉拍照，album是打开手机相册
					success: (res) => {
						// console.log("图片选择",this)
						const tempFilePaths = res.tempFilePaths;
						this.imagURL = res.tempFilePaths[0];
						// console.log("图片选择111",this.imagURL)

					}
				});
			},

			stochastic() {
				// console.log('成功');
				// try {
				const value = uni.getStorageSync("popUp-show-time");
				if (!value || new Date().getTime() - value > 1000 * 60 * 60 * 24) {
					uni.setStorageSync("popUp-show-time", new Date().getTime());
					this.showCouponNew = true;
					this.$refs.popup.open()
				} else {
					this.showCouponNew = false;
				}
				// } catch (e) {
				// 	this.showCouponNew = true;
				// 		console.log("失败");
				//}
				// success: (res) => {
				// 	console.log("ssss",res.data);
				// 	console.log("时间",new Date().getTime());
				// 	if (!res.data || new Date().getTime() - res.data > 1000 * 60 * 60 * 24) {
				// uni.setStorage({
				// 	key: "popUp-show-time",
				// 	data: new Date().getTime(),
				// });
				// 	uni.setStorageSync("popUp-show-time");
				// 	this.showCouponNew = true;
				// 	this.$refs.popup.open()
				// 	console.log("111")
				// }else{
				// 	this.showCouponNew = false;
				// 	console.log("222")
				// }
				// },
				// fail: (err) => {
				// 	this.showCouponNew = true;
				// 	console.log("失败");
				// },



				/* 	// 获取当前时间
					var now = new Date();
					// 将当前时间转化为时间戳
					var timestamp = now.getTime();
					// 获取之前存储的时间戳
					var prevTimestamp = localStorage.getItem('timestamp');
					// 判断时间戳是否存在，如果不存在则表示12小时内未触发过事件
					if (!prevTimestamp) {
					  // 存储当前时间戳
					  uni.setStorage({
					  	key: 'timestamp',
					  	data: this.timestamp,
					  	success: function (res) {
					  		// console.log('success');
							},
						})
					} else {
					  // 计算时间戳差值，单位为毫秒
					  var diff = timestamp - prevTimestamp;
					  // 判断差值是否小于等于12小时
					  if (diff <= 43200000) {
					    // 12小时内已经内已经触发过事件，更新存储的时间戳
						uni.setStorage({
							key: 'timestamp',
							data: this.timestamp,
							success: function (res) {
								// console.log('success');
							},
						})
						var num = Math.ceil(Math.random() * 1000000000 % 9);
							// this.rand = Math.floor(Math.random() * (this.max - this.min + 1)) + this.min
						if (num === 8) {
							this.$refs.popup.open()
						}
						}else{
							//12小时内未触发过事件，不做处理
						}
					} */
				// var num = Math.ceil(Math.random() * 1000000000 % 9);
				// this.rand = Math.floor(Math.random() * (this.max - this.min + 1)) + this.min
				// if (num === 8) {

				// }
			},
			closeCouponNew() {
				// debugger
				this.showCouponNew = false;
				//存key以及时间
				uni.setStorageSync("popUp-show-time", new Date().getTime());
				// uni.setStorage({
				// 	key: "popUp-show-time",
				// 	data: new Date().getTime(),
				// });
				// var num = Math.ceil(Math.random() * 1000000000 % 9);
				// console.log("随机数:",num);
				// if (num === 2) {

				// }
			},
			close() {
				let that = this
				if (this.imagURL === '' || this.imagURL.trim().length == 0) {
					uni.showToast({
						title: '请上传照片',
						icon: 'error',
						duration: 2000
					})
					return false;
				}
				var filePath = this.imagURL;
				qiniuUploader.upload(filePath, (res) => {
						console.log('res.imageURL', res.imageURL);
						that.photo = 'https://qiniu.yandaijia.cn' + res.imageURL
						console.log('that.photo', that.photo);
					}, (error) => {
						console.error('error123: ' + JSON.stringify(error));
					},
					// 此项为qiniuUploader.upload的第四个参数options。若想在单个方法中变更七牛云相关配置，可以使用上述参数。如果不需要在单个方法中变更七牛云相关配置，则可使用 null 作为参数占位符。推荐填写initQiniu()中的七牛云相关参数，然后此处使用null做占位符。
					// 若想自定义上传key，请把自定义key写入此处options的key值。如果在使用自定义key后，其它七牛云配置参数想维持全局配置，请把此处options除key以外的属性值置空。
					// 启用options参数请记得删除null占位符
					{
						region: 'NCN', // 华北区
						uptoken: this.Token,
						domain: '',
						shouldUseQiniuFileName: false,
						//key: 'testKeyNameLSAKDKASJDHKAS',

					}, {
						key: utils.getUUid()
					},
					(progress) => {
						// that.setData({
						//   'imageProgress': progress
						// });
						console.log('上传进度', progress.progress);
						console.log('已经上传的数据长度', progress.totalBytesSent);
						console.log('预期需要上传的数据总长度', progress.totalBytesExpectedToSend);
					},
					// cancelTask => that.setData({ cancelTask })
				);
				this.$refs.popup.close()
			},
			getwich() {
				uni.openLocation({
					latitude: parseFloat(this.order.start_latitude), //即将传到高德或腾讯地图的终点纬度
					longitude: parseFloat(this.order.start_longitude), //即将传到高德或腾讯地图的终点经度
					name: this.order.start_address, //即将传到高德或腾讯地图的店铺名称
					//即将传到高德或腾讯地图的详细地址
					scale: 18,
					success: function(res) {},
					fail: function(eroo) {}
				})

			},
			dateFormat(time) {
				let date = new Date(time);
				let year = date.getFullYear
				// 在日期格式中，月份是从0开始的，因此要加0，使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
				let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
				let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
				let hours1 = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
				let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
				if (date.getMinutes() < 45) {
					let minutes1 = date.getMinutes() + 15;
					//console.log("minutes1",minutes1);
					return hours1 + ":" + minutes1
				} else {
					let minutes2 = date.getMinutes() - 45 < 10 ? "0" + Number(date.getMinutes() - 45) : Number(date
						.getMinutes() - 45);
					//console.log("minutes2",minutes2);
					let hours2 = Number(hours1) + 1 < 10 ? "0" + (Number(hours1) + 1) : Number(hours1) + 1;
					return hours2 + ":" + minutes2
				}
				//let minutes = date.getMinutes() + 15 < 10 ? "0" + date.getMinutes() + 15 : date.getMinutes() + 15;

				// 拼接
				// return hours + ":" + minutes
				// return year + "-" + month + "-" + day;
			},

			Cleartime() {
				clearInterval(this.flag)
				uni.removeStorage({
					key: 'timers',
					success: function(res) {
						console.log('success');
					}
				});
			},
			cleartime1() {
				clearInterval(this.flag)
				clearInterval(this.flag1)
				clearInterval(this.flag2)
				this.test_s = 0
				this.test_m = 0
				this.test_h = 0
				this.time = "00:00:00"
				uni.setStorage({
					key: 'ds',
					data: this.test_s,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'dm',
					data: this.test_m,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'dh',
					data: this.test_h,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'ds1',
					data: this.test_s,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'dm1',
					data: this.test_m,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'dh1',
					data: this.test_h,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'ds2',
					data: this.test_s,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'dm2',
					data: this.test_m,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'dh2',
					data: this.test_h,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'endtime',
					data: this.time,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'qdtime',
					data: this.time,
					success: function(res) {}
				});
				uni.setStorage({
					key: 'ddtime',
					data: this.time,
					success: function(res) {}
				});
				uni.removeStorageSync('ds');
				uni.removeStorageSync('dm');
				uni.removeStorageSync('dh');
				uni.removeStorageSync('ds1');
				uni.removeStorageSync('dm1');
				uni.removeStorageSync('dh1');
				uni.removeStorageSync('ds2');
				uni.removeStorageSync('dm2');
				uni.removeStorageSync('dh2');
				uni.removeStorageSync('qdtime');
				uni.removeStorageSync('ddtime');
				uni.removeStorageSync('endtime');
			},
			callPhone(mobile) {
				uni.makePhoneCall({
					phoneNumber: mobile
				});
			},
			async gettoken() {
				let rog = await api.gettoken();
				this.Token = rog
			},
			async pay() {
				this.cleartime1()
				// console.log("price", this.price);
				if (this.price === '' || this.price.trim().length === 0) {
					uni.showToast({
						title: '请输入金额',
						icon: 'error',
						duration: 2000
					})
					return false;
				} else {
					uni.getLocation({
						type: 'gcj02',
						success: async ret => {
							// uni.showLoading({
							// 	title: '加载中'
							// });
							this.time = "00:00:00"
							uni.setStorage({
								key: 'endtime',
								data: this.time,
								success: function(res) {}
							});
							this.is_show = false
							// 更新一次结束位置
							await this.updateOrderInfo();
							// 结束订单
							console.log('voicePath::', this.voicePath);
							let res = await api.getpay(this.orderId, this.price, this.voicePath, this
								.startMin);
							helper.toast(res.msg);

							// console.log(res)
							if (res.code === 1) {
								uni.navigateTo({
									url: "/pages/index/index"
								})
								// uni.hideLoading();
							}
							// 更新订单信息
						},
						fail: e => {
							helper.toast('获取位置失败');
						}
					});
				}
			},
			selectAddress(type) {
				this.focus = false;
				this.selectType = type;
				this.suggestion = [];
				this.input = '';
				this.openPopup();

			},
			openPopup(key) {
				let popup = key || 'popup';
				this.$refs['popup'].open();
			},
			closePopup(key) {
				let popup = key || 'popup';
				this.$refs['popup'].close();
			},
			routerdetail(id) {
				const url = `/pagesB/TUI-Chat/chat?conversationID=${id}`;
				uni.navigateTo({
					url
				});
			},
			handleRoute(id) {
				// console.log(id)
				const url = `/pagesB/TUI-Chat/chat?conversationID=${id}`;
				uni.navigateTo({
					url
				});
			},


			endadress() {
				uni.navigateTo({
					url: "/pagesA/myDriving/address"
				})
			},
			call(mobile) {
				uni.makePhoneCall({
					phoneNumber: mobile
				});
			},
			reach() {

				this.daoda_time = true
				uni.showModal({
					title: '操作提示',
					content: '请确认已到达出发地点等待用户',
					success: async e => {
						if (e.confirm) {
							this.clearStartTime()
							// uni.showLoading({
							// 	title: '加载中'
							// });

							let res = await api.orderReach(this.orderId, this.photo);
							if (res.code == 1) {
								this.getOrderInfo();
								// uni.hideLoading();
								clearInterval(this.flag2)
								this.test_s = 0
								this.test_m = 0
								this.test_h = 0
								this.time = "00:00:00"
								uni.setStorage({
									key: 'ds',
									data: this.test_s,
									success: function(res) {}
								});
								uni.setStorage({
									key: 'dm',
									data: this.test_m,
									success: function(res) {}
								});
								uni.setStorage({
									key: 'dh',
									data: this.test_h,
									success: function(res) {}
								});
								uni.removeStorageSync('ds');
								uni.removeStorageSync('dm');
								uni.removeStorageSync('dh');
								uni.removeStorageSync('status');
								clearInterval(this.flag2)
								this.time = "00:00:00"
								uni.setStorage({
									key: 'qdtime',
									data: this.time,
									success: function(res) {}
								});
								this.begin()
							} else {
								helper.toast(res.msg);
							}
							uni.removeStorage({
								key: "qdtime"
							})
						}
					}
				});
			},

			done() {
				uni.removeStorage({
					key: 'timers',
					success: function(res) {
						console.log('success');
					}
				});
				uni.showModal({
					title: '操作提示',
					content: '请确认已经达到目的地',
					success: async e => {
						this.pause
						if (e.confirm) {
							this.clearStartTime()
							// uni.showLoading({
							// 	title: '加载中'
							// });
							clearInterval(this.flag1)
							uni.getLocation({
								type: 'gcj02',
								success: async ret => {
									clearInterval(this.flag)
									clearInterval(this.flag1)
									clearInterval(this.flag2)
									this.test_s = 0
									this.test_m = 0
									this.test_h = 0
									this.time = "00:00:00"
									uni.setStorage({
										key: 'ds',
										data: this.test_s,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'dm',
										data: this.test_m,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'dh',
										data: this.test_h,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'ds1',
										data: this.test_s,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'dm1',
										data: this.test_m,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'dh1',
										data: this.test_h,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'ds2',
										data: this.test_s,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'dm2',
										data: this.test_m,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'dh2',
										data: this.test_h,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'endtime',
										data: this.time,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'qdtime',
										data: this.time,
										success: function(res) {}
									});
									uni.setStorage({
										key: 'ddtime',
										data: this.time,
										success: function(res) {}
									});
									uni.removeStorageSync('ds');
									uni.removeStorageSync('dm');
									uni.removeStorageSync('dh');
									uni.removeStorageSync('ds1');
									uni.removeStorageSync('dm1');
									uni.removeStorageSync('dh1');
									uni.removeStorageSync('ds2');
									uni.removeStorageSync('dm2');
									uni.removeStorageSync('dh2');
									uni.removeStorageSync('qdtime');
									uni.removeStorageSync('ddtime');
									uni.removeStorageSync('endtime');
									this.is_show = true
									// 更新一次结束位置
									await this.updateOrderInfo();
									// 结束订单
									let res = await api.doneOrder({
										order_id: this.orderId,
										latitude: ret.latitude,
										longitude: ret.longitude
									});

									// 更新订单信息
									this.getOrderInfo();
									this.endRecord();
									this.stop()
									// uni.hideLoading();
								},
								fail: e => {
									helper.toast('获取位置失败');
								}
							});
						}
					}
				});
			},
			// startUpload() {

			// 	let that = this;
			// 	var filePath = this.voicePath;
			// 	console.log("filepath"+this.voicePath);return false;
			// 	console.log(qiniuUploader.upload)
			// 	 qiniuUploader.upload(filePath, (res) => {
			// 		 console.log("res"+res)
			// 	 })
			// },

			startRecord() {
				console.log('开始录音');

				recorderManager.start({
					format: 'mp3'
				});
			},
			// 拍照抽查
			photo(value) {

				var filePath = value;
				console.log("uploadphoto", filePath)
				// console.log(filePath);return false;

				// var filePath = res.tempFilePaths[0];
				// wx.chooseImage 目前微信官方尚未开放获取原图片名功能(2020.4.22)
				// 向七牛云上传
				console.log("uploadToken", this.Token, )
				qiniuUploader.upload(filePath, (res) => {
						// console.log(2323232,filePath)
						console.log(res);
						this.photo = 'https://qiniu.yandaijia.cn' + res.fileURL
					}, (error) => {
						console.error('error: ' + JSON.stringify(error));
					},
					// 此项为qiniuUploader.upload的第四个参数options。若想在单个方法中变更七牛云相关配置，可以使用上述参数。如果不需要在单个方法中变更七牛云相关配置，则可使用 null 作为参数占位符。推荐填写initQiniu()中的七牛云相关参数，然后此处使用null做占位符。
					// 若想自定义上传key，请把自定义key写入此处options的key值。如果在使用自定义key后，其它七牛云配置参数想维持全局配置，请把此处options除key以外的属性值置空。
					// 启用options参数请记得删除null占位符
					{
						region: 'NCN', // 华北区
						uptoken: this.Token,
						domain: '',
						shouldUseQiniuFileName: false,
						//key: 'testKeyNameLSAKDKASJDHKAS',

					}, {
						key: utils.getUUid()
					},
					(progress) => {
						// that.setData({
						//   'imageProgress': progress
						// });
						console.log('上传进度', progress.progress);
						console.log('已经上传的数据长度', progress.totalBytesSent);
						console.log('预期需要上传的数据总长度', progress.totalBytesExpectedToSend);
					},
					// cancelTask => that.setData({ cancelTask })
				);
			},
			// 初始化七牛云相关配置

			startUpload(value) {

				var filePath = value;
				console.log("uploadfile", filePath)
				// console.log(filePath);return false;

				// var filePath = res.tempFilePaths[0];
				// wx.chooseImage 目前微信官方尚未开放获取原图片名功能(2020.4.22)
				// 向七牛云上传
				console.log("uploadToken", this.Token)
				qiniuUploader.upload(filePath, (res) => {
						this.voicePath = 'https://qiniu.yandaijia.cn' + res.fileURL
					}, (error) => {
						console.error('error: ' + JSON.stringify(error));
					},
					// 此项为qiniuUploader.upload的第四个参数options。若想在单个方法中变更七牛云相关配置，可以使用上述参数。如果不需要在单个方法中变更七牛云相关配置，则可使用 null 作为参数占位符。推荐填写initQiniu()中的七牛云相关参数，然后此处使用null做占位符。
					// 若想自定义上传key，请把自定义key写入此处options的key值。如果在使用自定义key后，其它七牛云配置参数想维持全局配置，请把此处options除key以外的属性值置空。
					// 启用options参数请记得删除null占位符
					{
						region: 'NCN', // 华北区
						uptoken: this.Token,
						domain: '',
						shouldUseQiniuFileName: false,
						//key: 'testKeyNameLSAKDKASJDHKAS',

					}, {
						key: utils.getUUid()
					},
					(progress) => {
						// that.setData({
						//   'imageProgress': progress
						// });
						console.log('上传进度', progress.progress);
						console.log('已经上传的数据长度', progress.totalBytesSent);
						console.log('预期需要上传的数据总长度', progress.totalBytesExpectedToSend);
					},
					// cancelTask => that.setData({ cancelTask })
				);
			},
			endRecord() {
				console.log('123录音结束');
				recorderManager.stop();

			},
			start() {
				//计时
				//存储本地时间

				// console.log('time123',this.startFw);
				uni.setStorage({
					key: 'timers',
					data: this.startFw,
					success: function(res) {
						// console.log('success');
					}
				});
				//清楚缓存时间
				uni.removeStorage({
					key: 'timers',
					success: function(res) {}
				});
				uni.showModal({
					title: '操作提示',
					content: '请确认已接到用户并马上出发吗？',
					success: async e => {
						// this.pause()
						if (e.confirm) {
							this.clearStartTime()
							// uni.showLoading({
							// 	title: '加载中'
							// });
							clearInterval(this.flag)
							this.test_s1 = 0
							this.test_m1 = 0
							this.test_h1 = 0
							this.time = "00:00:00"
							uni.setStorage({
								key: 'ds1',
								data: this.test_s1,
								success: function(res) {}
							});
							uni.setStorage({
								key: 'dm1',
								data: this.test_m1,
								success: function(res) {}
							});
							uni.setStorage({
								key: 'dh1',
								data: this.test_h1,
								success: function(res) {}
							});
							uni.removeStorageSync('ds1');
							uni.removeStorageSync('dm1');
							uni.removeStorageSync('dh1');
							clearInterval(this.flag)
							this.time = "00:00:00"
							uni.setStorage({
								key: 'ddtime',
								data: this.time,
								success: function(res) {}
							});
							this.beginstart()
							uni.removeStorage({
								key: "ddtime"
							})
							// console.log(1);
							uni.getLocation({
								type: 'gcj02',
								success: async ret => {
									// console.log(2);
									// 当前地址
									let res = await api.startOrder({
										order_id: this.orderId,
										latitude: ret.latitude,
										longitude: ret.longitude
									});

									this.getOrderInfo();
									this.startRecord()
									// uni.hideLoading();
								},
								fail: e => {
									helper.toast('获取位置失败');
								}
							});
						}
					}
				});
			},
			async sendTimes() {
				let data = {
					order_id: this.orderId,
					type: 2,
					minute: 600
				}

				let res = await api.getorderUpdateTimes(data);
			},
			async sendTimes1() {
				let data = {
					order_id: this.orderId,
					type: 3,
					minute: 900
				}

				let res = await api.getorderUpdateTimes(data);
			},
			starts() {
				let that = this
				this.flag2 = setInterval(() => {
					this.second2 = this.second2 + 1;
					if (this.second2 >= 60) {
						this.second2 = 0;
						this.minute2 = this.minute2 + 1;
					}

					if (this.minute2 >= 60) {
						this.minute2 = 0;
						this.hour2 = this.hour2 + 1;
					}
					this.time2 =
						this.complZero(this.hour2) +
						":" +
						this.complZero(this.minute2) +
						":" +
						this.complZero(this.second2);

					this.startQd = this.time2;
					if (this.time2 >= "00:10:00") {
						this.color = 'red'
						this.sendTimes()
					}
					if (that.test_s == 0) {
						uni.setStorage({
							key: 'ds',
							data: this.second2,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'dm',
							data: this.minute2,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'dh',
							data: this.hour2,
							success: function(res) {}
						})
					}
					uni.setStorage({
						key: 'qdtime',
						data: this.startQd,
						success: function(res) {}
					});

				}, 1000);
			},
			beginSecond(vals, valm, valh) {
				let that = this
				that.test_s = vals
				that.test_m = valm
				that.test_h = valh
				this.minute2 = that.test_m
				this.hour2 = that.test_h
				this.flag1 = setInterval(() => {

					that.test_s = that.test_s + 1;
					uni.setStorage({
						key: 'ds',
						data: that.test_s,
						success: function(res) {}
					})
					if (that.test_s >= 60) {
						that.test_s = 0;
						this.minute2 = this.minute2 + 1;
						uni.setStorage({
							key: 'dm',
							data: this.minute2,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'ds',
							data: that.test_s,
							success: function(res) {}
						})

					}
					if (this.minute2 >= 60) {
						this.minute2 = 0;
						uni.setStorage({
							key: 'dm',
							data: this.minute2,
							success: function(res) {}
						})
						this.hour2 = this.hour2 + 1;
						uni.setStorage({
							key: 'dh',
							data: this.hour2,
							success: function(res) {}
						})
					}
					this.time2 =
						this.complZero(this.hour2) +
						":" +
						this.complZero(this.minute2) +
						":" +
						this.complZero(that.test_s);
						this.startQd = this.time2;
						if (this.time2 >= "00:10:00") {
							this.color = 'red'
							this.sendTimes()
						}
					uni.setStorage({
						key: 'qdtime',
						data: this.time2,
						success: function(res) {}
					});
				}, 1000);
			},
			begin() {
				let that = this
				// debugger
				this.pause();
				this.flag = setInterval(() => {
					this.second = this.second + 1;
					if (this.second >= 60) {
						this.second = 0;
						this.minute = this.minute + 1;
					}

					if (this.minute >= 60) {
						this.minute = 0;
						this.hour = this.hour + 1;
					}
					this.time =
						this.complZero(this.hour) +
						":" +
						this.complZero(this.minute) +
						":" +
						this.complZero(this.second);
					this.startDd = this.time;
					uni.setStorage({
						key: 'ddtime',
						data: this.startDd,
						success: function(res) {}
					});
					if (that.test_s1 == 0) {
						uni.setStorage({
							key: 'ds1',
							data: this.second,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'dm1',
							data: this.minute,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'dh1',
							data: this.hour,
							success: function(res) {}
						})
					}
					if (this.time >= "00:15:00") {
						this.color = "red"
						this.sendTimes1()
					}
				}, 1000);
			},
			beginSecond1(vals, valm, valh) {
				let that = this
				that.test_s1 = vals
				that.test_m1 = valm
				that.test_h1 = valh
				this.minute2 = that.test_m1
				this.hour2 = that.test_h1
				this.flag = setInterval(() => {

					that.test_s1 = that.test_s1 + 1;
					uni.setStorage({
						key: 'ds1',
						data: that.test_s1,
						success: function(res) {}
					})
					if (that.test_s1 >= 60) {
						that.test_s1 = 0;
						this.minute2 = this.minute2 + 1;
						uni.setStorage({
							key: 'dm1',
							data: this.minute2,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'ds1',
							data: that.test_s1,
							success: function(res) {}
						})

					}
					if (this.minute2 >= 60) {
						this.minute2 = 0;
						uni.setStorage({
							key: 'dm1',
							data: this.minute2,
							success: function(res) {}
						})
						this.hour2 = this.hour2 + 1;
						uni.setStorage({
							key: 'dh1',
							data: this.hour2,
							success: function(res) {}
						})
					}
					this.time2 =
						this.complZero(this.hour2) +
						":" +
						this.complZero(this.minute2) +
						":" +
						this.complZero(that.test_s1);
					this.startDd = this.time2
					uni.setStorage({
						key: 'ddtime',
						data: this.time2,
						success: function(res) {}
					});
					if (this.time >= "00:15:00") {
						this.color = "red"
						this.sendTimes1()
					}
				}, 1000);
			},
			beginstart() {
				let that = this
				this.color = "#3294FF"
				clearInterval(this.flag1)
				this.hour1 = 0;
				this.minute1 = 0;
				this.second1 = 0;
				this.time1 = "00:00:00";
				this.flag1 = setInterval(() => {
					// debugger
					this.second1 += 1;
					if (this.second1 >= 60) {
						this.second1 = 0;
						this.minute1 += 1;
					}
					if (this.minute1 >= 60) {
						this.minute1 = 0;
						this.hour1 += 1;
					}
					this.time1 =
						this.complZero(this.hour1) +
						":" +
						this.complZero(this.minute1) +
						":" +
						this.complZero(this.second1);
					this.startFw = this.time1;
					this.startMin = this.hour1 * 60 + this.minute1
					this.endDd = this.time1;
					this.s_end = this.time1;
					if (that.test_s2 == 0) {
						uni.setStorage({
							key: 'ds2',
							data: this.second1,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'dm2',
							data: this.minute1,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'dh2',
							data: this.hour1,
							success: function(res) {}
						})
					}
					uni.setStorage({
						key: 'endtime',
						data: this.endDd,
						success: function(res) {}
					});
					// if (this.time1 >= "00:15:00") {
					// 	this.color = "red"
					// 	this.sendTimes1()
					// }
				}, 1000);
			},
			beginSecond2(vals, valm, valh) {
				let that = this
				that.test_s2 = vals
				// that.test_m2 = valm
				// that.test_h2 = valh
				this.minute1 = valm
				this.hour1 = valh
				this.flag1 = setInterval(() => {
					that.test_s2 = that.test_s2 + 1;
					uni.setStorage({
						key: 'ds2',
						data: that.test_s2,
						success: function(res) {}
					})
					if (that.test_s2 >= 60) {
						that.test_s2 = 0;
						this.minute1 = this.minute1 + 1;
						uni.setStorage({
							key: 'dm2',
							data: this.minute1,
							success: function(res) {}
						})
						uni.setStorage({
							key: 'ds2',
							data: that.test_s2,
							success: function(res) {}
						})

					}
					if (this.minute1 >= 60) {
						this.minute1 = 0;
						uni.setStorage({
							key: 'dm2',
							data: this.minute1,
							success: function(res) {}
						})
						this.hour1 = this.hour1 + 1;
						uni.setStorage({
							key: 'dh2',
							data: this.hour1,
							success: function(res) {}
						})
					}
					this.time1 =
						this.complZero(this.hour1) +
						":" +
						this.complZero(this.minute1) +
						":" +
						this.complZero(that.test_s2);
					this.startFw = this.time1
					this.endDd = this.time1
					this.startMin = this.hour1*60+this.minute1
					uni.setStorage({
						key: 'endtime',
						data: this.endDd,
						success: function(res) {}
					});
					// if (this.time1 >= "00:15:00") {
					// 	this.color = "red"
					// 	this.sendTimes1()
					// }
				}, 1000);
			},
			complZero(n) {
				return n < 10 ? "0" + n : "" + n;
			},
			// 重新计时
			pause() {

				clearInterval(this.flag)
				this.hour = 0;
				this.minute = 0;
				this.second = 0;
				this.time = "00:00:00";
				this.color = "#3294FF";
			},
			clearStartTime(){
					clearInterval(this.flag2)
					this.test_s = 0
					this.test_m = 0
					this.test_h = 0
					this.time = "00:00:00"
					uni.setStorage({
						key: 'ds',
						data: this.test_s,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dm',
						data: this.test_m,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dh',
						data: this.test_h,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'ds1',
						data: this.test_s,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'qdtime',
						data: this.time,
						success: function(res) {}
					});
					uni.removeStorageSync('ds');
					uni.removeStorageSync('dm');
					uni.removeStorageSync('dh');
					uni.removeStorageSync('qdtime');
					
			},
			stop() {
				clearInterval(this.flag)
				this.useTime = this.time
				// console.log(this.useTime)
			},

			test() {
				console.log("开始录音")
				uni.getSetting({
					success: (res) => {
						console.log('res.authSetting', res.authSetting['scope.record']);
						if (res.authSetting['scope.record'] == false) {
							uni.showToast({
								title: '请先开启麦克风授权',
								icon: 'none'
							})
							return false
						}
						// console.log(111);
						uni.authorize({
							scope: 'scope.record',
							success: (res) => {
								recorderManager.start({
									format: "mp3",
									// success: (res) => {
									// 	console.log(res)
									// }
								})
							},
							fail: (res) => {
								uni.showModal({
									content: '检测到您没打开录音功能权限，是否去设置打开？',
									confirmText: "确认",
									cancelText: '取消',
									success(res) {
										recorderManager.start();
										t.time = setInterval(this.timer, 50)
									}
								})
								// uni.showToast({
								// 	title: '喊话失败',
								// 	icon: 'none'
								// })
							}
						})
					}
				})
			},




			initSdk() {
				this.qqmapsdk = new QQMapWX({
					key: helper.config.qqmapsdk.key
				});
			},
			//async getOrderPayScanInfo() {
			//let res = await api.getOrderPayScanInfo(this.orderId);
			//this.paystr = res.code_url;
			//},
		
			async getOrderInfo() {
				// console.log('获取订单信息');
				let res = await api.getOrderInfo(this.orderId);
				this.order = res.data;
				console.log("6666", this.order.status);
				// 如果订单未开始，以用户位置未起始点
				if (this.order.status == 1) {
					this.map.latitude = res.data.start_latitude;
					this.map.longitude = res.data.start_longitude;
					// 设置用户坐标点
					this.map.covers.push({
						latitude: res.data.start_latitude,
						longitude: res.data.start_longitude,
						iconPath: '../../static/marker.png'
					});
					this.updateOrderInfo1();
					let that = this
					// uni.getStorage({
					// 	key: 'ds',
					// 	success: function(res) {
					// 		console.log("9991", res.data);
					// 	},
					// 	fail: function() {
					// 		console.log("失败1");
					// 		that.starts()
					// 	}
					// })
				}
				if (this.order.status == 4) {
					this.map.latitude = res.data.start_latitude;
					this.map.longitude = res.data.start_longitude;
					// 设置用户坐标点
					this.map.covers.push({
						latitude: res.data.start_latitude,
						longitude: res.data.start_longitude,
						iconPath: '../../static/marker.png'
					});
					this.updateOrderInfo1();
					clearInterval(this.flag2)
					this.test_s = 0
					this.test_m = 0
					this.test_h = 0
					this.time = "00:00:00"
					uni.setStorage({
						key: 'ds',
						data: this.test_s,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dm',
						data: this.test_m,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dh',
						data: this.test_h,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'qdtime',
						data: this.time,
						success: function(res) {}
					});
					uni.removeStorageSync('ds');
					uni.removeStorageSync('dm');
					uni.removeStorageSync('dh');
					uni.removeStorageSync('qdtime');
					let that = this
					setTimeout(() => {
						uni.getStorage({
							key: 'ds1',
							success: function(res) {
								console.log("999", res.data);
							},
							fail: function() {
								console.log("失败");
								that.begin()
							}
						})
					}, 2000)
				}
				if (this.order.status == 0) {
					this.map.latitude = res.data.start_latitude;
					this.map.longitude = res.data.start_longitude;
					// 设置用户坐标点
					this.map.covers.push({
						latitude: res.data.start_latitude,
						longitude: res.data.start_longitude,
						iconPath: '../../static/marker.png'
					});
					this.updateOrderInfo1();
				}
				// 如果订单为进行中，则实时更新费用及到达时间
				if (this.order.status == 2) {
					// setInterval(()=>{
					// 	this.getfootprint()
					// },1000*30)
					// this.cleartime1()
					this.updateOrderInfo();
					// this.test()
					clearInterval(this.flag2)
					this.test_s = 0
					this.test_m = 0
					this.test_h = 0
					this.time = "00:00:00"
					uni.setStorage({
						key: 'ds',
						data: this.test_s,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dm',
						data: this.test_m,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dh',
						data: this.test_h,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'qdtime',
						data: this.time,
						success: function(res) {}
					});
					uni.removeStorageSync('ds');
					uni.removeStorageSync('dm');
					uni.removeStorageSync('dh');
					uni.removeStorageSync('qdtime');
					clearInterval(this.flag)
					this.test_s = 0
					this.test_m = 0
					this.test_h = 0
					this.time = "00:00:00"
					uni.setStorage({
						key: 'ds1',
						data: this.test_s,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dm1',
						data: this.test_m,
						success: function(res) {}
					});
					uni.setStorage({
						key: 'dh1',
						data: this.test_h,
						success: function(res) {}
					});

					uni.setStorage({
						key: 'ddtime',
						data: this.time,
						success: function(res) {}
					});

					uni.removeStorageSync('ds1');
					uni.removeStorageSync('dm1');
					uni.removeStorageSync('dh1');
					uni.removeStorageSync('ddtime');
					let that = this
					setTimeout(() => {
						uni.getStorage({
							key: 'ds2',
							success: function(res) {	
								console.log("999", res.data);
							},
							fail: function() {
								console.log("失败");
								// that.beginSecond2(0,0,0)
								that.beginstart()
							}
						})
					}, 2000)
				}
				if (this.order.status == -1) {
					this.cleartime1()
				}
				if (this.order.status == 3) {
					this.cleartime1()
				}
				// 获取支付订单信息
				// if (this.order.status == 3 && !this.paystr) {
				// 	this.getOrderPayScanInfo();
				// }
				// 如果订单为未完成状态，则定时更新
				if (this.order.status != 99 && !this.timer) {
					console.log('注册定时器');
					this.timer = setInterval(() => {
						this.getOrderInfo();
					}, 10 * 1000);
				}
				// 如果订单状态为已完成，切存在定时器，则关闭
				if (this.order.status == 99 && this.timer) {
					// console.log('清除定时器');
					this.cleartime1()
					clearInterval(this.timer);
					this.timer = '';
				}
			},
			getfootprint(){
				// 更新坐标信息
				uni.getLocation({
					type: 'gcj02',
					success: async res => {
						// 当前地址
						this.currLocation = res;
						this.map.latitude = res.latitude;
						this.map.longitude = res.longitude;
						// 设置当前坐标点
						this.map.covers = [{
							latitude: res.latitude,
							longitude: res.longitude,
							iconPath: '../../static/marker.png'
						}];
						// 更新用户位置
						res.order_id = this.orderId;
						let data = await api.getfootprint(res);
						this.actual = data.data;
						this.direction();
					}
				});
			},
			updateOrderInfo() {
				// 更新坐标信息
				uni.getLocation({
					type: 'gcj02',
					success: async res => {
						// 当前地址
						this.currLocation = res;
						this.map.latitude = res.latitude;
						this.map.longitude = res.longitude;
						// 设置当前坐标点
						this.map.covers = [{
							latitude: res.latitude,
							longitude: res.longitude,
							iconPath: '../../static/marker.png'
						}];
						// 更新用户位置
						res.order_id = this.orderId;
						let data = await api.updateOrderLocation(res);
						this.actual = data.data;
						this.direction();
					}
				});
			},
			updateOrderInfo1() {
				// 更新坐标信息
				uni.getLocation({
					type: 'gcj02',
					success: async res => {
						// 当前地址
						this.currLocation = res;
						this.map.latitude = res.latitude;
						this.map.longitude = res.longitude;
						// 设置当前坐标点
						this.map.covers = [{
							latitude: res.latitude,
							longitude: res.longitude,
							iconPath: '../../static/marker.png'
						}];
						// 更新用户位置
						res.order_id = this.orderId;
						let data = await api.updateOrderLocation(res);
						this.actual = data.data;
						this.direction1();
					}
				});
			},
			setAddress(address) {
				if (this.selectType == 'end') {
					this.toAddress = address;
				} else {
					this.currAddress = {
						formatted_addresses: {
							recommend: address.title
						},
						ad_info: {
							city: address.city
						},
						address: address.addr,
						location: {
							lat: address.latitude,
							lng: address.longitude
						}
					};
				}
				this.closePopup();
			},
			backto() {
				uni.reLaunch({
					url: "/pagesA/myDriving/myDriving"
				})
			},
			// 路径规划
			direction() {
				this.qqmapsdk.direction({
					mode: 'driving',
					from: this.currLocation.latitude + ',' + this.currLocation.longitude,
					to: this.order.end_latitude + ',' + this.order.end_longitude,
					complete: res => {
						if (!res.result || !res.result.routes || res.result.routes.length == 0) {
							// helper.toast('未获取到有效路线');
							return false;
						}
						let coors = res.result.routes[0].polyline,
							pl = []; //坐标解压（返回的点串坐标，通过前向差分进行压缩）
						this.route = res.result.routes[0];
						let kr = 1000000;
						// 处理坐标
						for (let i = 2; i < coors.length; i++) {
							coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr;
						}
						for (let i = 0; i < coors.length; i += 2) {
							pl.push({
								latitude: coors[i],
								longitude: coors[i + 1]
							});
						}
						this.map.latitude = pl[0].latitude;
						this.map.longitude = pl[0].longitude;
						this.map.polyline = [{
							points: pl,
							color: '#227AFF',
							width: 4
						}];
						this.isDirection = true;
					}
				});
			},
			direction1() {
				// console.log(this.order.start_latitude)
				this.qqmapsdk.direction({

					mode: 'driving',
					from: this.currLocation.latitude + ',' + this.currLocation.longitude,
					to: this.order.start_latitude + ',' + this.order.start_longitude,
					complete: res => {
						this.call()
						if (!res.result || !res.result.routes || res.result.routes.length == 0) {
							// helper.toast('未获取到有效路线');
							return false;
						}
						let coors = res.result.routes[0].polyline,
							pl = []; //坐标解压（返回的点串坐标，通过前向差分进行压缩）
						this.route = res.result.routes[0];
						let kr = 1000000;
						// 处理坐标
						for (let i = 2; i < coors.length; i++) {
							coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr;
						}
						for (let i = 0; i < coors.length; i += 2) {
							pl.push({
								latitude: coors[i],
								longitude: coors[i + 1]
							});
						}
						this.map.latitude = pl[0].latitude;
						this.map.longitude = pl[0].longitude;
						this.map.polyline = [{
							points: pl,
							color: '#227AFF',
							width: 4
						}];
						this.isDirection = true;
					}
				});

			},
			call() {
				// if (!this.toAddress.title) {
				//   helper.toast('请输入目的地');
				//   return false;
				// }
				// let from = this.currAddress.location.lat + ',' + this.currAddress.location.lng;
				// let to = this.toAddress.latitude + ',' + this.toAddress.longitude;
				// 计算驾车距离
				this.qqmapsdk.calculateDistance({
					mode: 'driving',
					from: this.currLocation.latitude + ',' + this.currLocation.longitude,
					to: this.order.start_latitude + ',' + this.order.start_longitude,
					complete: async res => {
						this.actual = res.result.elements[0];
						// console.log('距离' + this.actual.distance)
					}
				});
			},
		}
	};
</script>
<style lang="scss" scoped>
	.qu {
		width: 20rpx;
		height: 20rpx;
	}

	.uni-popup {
		position: fixed;
		top: 0 !important;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 998;
		overflow: hidden;


		.popcenter {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			border-radius: 20rpx 20rpx 20rpx 20rpx;

			view {
				text-align: center;
			}

			.shot_image {
				height: 400rpx;
				width: 350rpx;

				margin: 30rpx auto;

				img {
					width: 100%;
					height: 100%;
				}
			}

			.shot {
				background: linear-gradient(#F2672C, #FFA23B);
				color: #ffffff;
				border-radius: 100rpx;
				width: 80%;
				margin-top: 30rpx;
			}
		}
	}
</style>
<style>
	.endAdress {
		width: 100%;
		height: 30rem
	}

	.end1 {
		float: left;
		width: 12%;
	}

	.end2 {
		width: 88%;
		float: left;
		height: 40rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
		color: rgba(228, 136, 78, 1);
	}

	.box1234 {
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		/* font-weight: 500; */
		text-align: left;
		white-space: wrap;
		line-height: 32rpx;
		margin-right: 50px;
		width: 430rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
	}

	.page {
		background-color: rgba(238, 238, 238, 1.000000);
		position: relative;
		width: 750rpx;
		height: 1400rpx;
		overflow: hidden;
		display: flex;
		flex-direction: column;

	}

	.uni-popup {
		position: fixed;
		top: 0 !important;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 998;
		overflow: hidden;

	}

	.uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box {
		position: relative;
		max-width: 80%;
		max-height: 80%;
		overflow-y: scroll;
		border-radius: 25rpx !important;
	}

	.box123 {
		margin-left: -146rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		/* font-weight: 500; */
		text-align: left;
		white-space: wrap;
		line-height: 32rpx;
		margin-right: 50px;
		width: 430rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
	}

	.box_13 {
		width: 750rpx;
		height: 1624rpx;
		flex-direction: row;
		display: flex;
	}

	.group_22 {
		width: 750rpx;
		height: 1066rpx;
		display: flex;
		flex-direction: column;
	}

	.group_1 {
		background-color: rgba(255, 255, 255, 1.000000);
		border-radius: 0rpx 0rpx 40rpx 40rpx;
		height: 300rpx;
		border-radius: 0rpx 0rpx 40rpx 40rpx;
		width: 750rpx;
		display: flex;
		flex-direction: column;
		margin-top: 1px;
	}

	.box_14 {
		width: 592rpx;
		height: 118rpx;
		flex-direction: row;
		display: flex;
		justify-content: space-between;
		margin: 34rpx 0 0 64rpx;
	}

	.section_7 {
		width: 540rpx;
		height: 102rpx;
		margin-top: 14rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.group_23 {
		width: 196rpx;
		height: 40rpx;
		flex-direction: row;
		display: flex;
		justify-content: space-between;
	}

	.text_1 {
		width: 36rpx;
		height: 36rpx;
		overflow-wrap: break-word;
		color: rgba(0, 0, 0, 1.000000);
		font-size: 36rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 36rpx;
		margin-top: 4rpx;
	}

	.text-wrapper_1 {
		width: 160rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 40rpx;
	}

	.text_2 {
		width: 160rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		color: rgba(228, 136, 78, 1);
		font-size: 30rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 40rpx;
	}

	.text-wrapper_2 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
		margin-top: 34rpx;
	}

	.text_5 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 28rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
	}

	.text_6 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 28rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
	}

	.text_7 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		color: rgba(228, 136, 78, 1);
		font-size: 28rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
	}

	.text_8 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 28rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
	}

	.text_9 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 28rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
	}

	.text_10 {
		width: 324rpx;
		height: 28rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 28rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
	}

	.image-text_5 {
		width: 68rpx;
		height: 118rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.icon_1 {
		width: 68rpx;
		height: 70rpx;
	}

	.text-group_1 {
		width: 64rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
		margin: 16rpx 0 0 2rpx;
	}

	.text_11 {
		width: 64rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_12 {
		width: 64rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.box_15 {
		width: 502rpx;
		height: 32rpx;
		flex-direction: row;
		display: flex;
		justify-content: space-between;
		margin: 72rpx 0 44rpx 120rpx;
	}

	.text-wrapper_3 {
		width: 174rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_13 {
		width: 174rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_14 {
		width: 174rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(228, 136, 78, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_15 {
		width: 174rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text-wrapper_4 {
		width: 146rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_16 {
		width: 146rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_17 {
		width: 146rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(228, 136, 78, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_18 {
		width: 146rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_19 {
		width: 146rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(132, 132, 132, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.block_10 {
		width: 260rpx;
		height: 56rpx;
		flex-direction: row;
		display: flex;
		justify-content: space-between;
		margin: 22rpx 0 0 450rpx;
	}

	.tag_1 {
		background-color: rgba(255, 255, 255, 1.000000);
		border-radius: 14rpx;
		margin-top: 6rpx;
		display: flex;
		flex-direction: column;
		width: 200rpx;
	}

	.text-wrapper_5 {
		width: 126rpx;
		height: 18rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Regular;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 18rpx;
		margin: 14rpx 0 0 14rpx;
	}

	.text_20 {
		width: 126rpx;
		height: 18rpx;
		overflow-wrap: break-word;
		color: rgba(170, 170, 170, 1);
		font-size: 18rpx;
		font-family: Source Han Sans CN-Regular;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 18rpx;
	}

	.icon_2 {
		box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.160784);
		background-color: rgba(255, 255, 255, 1.000000);
		border-radius: 100%;
		height: 56rpx;
		display: flex;
		flex-direction: column;
		width: 56rpx;
	}

	.section_1 {
		height: 36rpx;
		/* 	  background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/MasterDDSSlicePNGf7a837a31b107b4647852e7dd4b6a0b1.png) 100% no-repeat; */
		background-size: 100% 100%;
		display: flex;
		flex-direction: column;
		width: 36rpx;
		margin: 10rpx 0 0 10rpx;
	}

	.section_2 {
		width: 36rpx;
		height: 36rpx;
		display: flex;
		flex-direction: column;

	}

	.group_4 {
		background-color: rgba(227, 236, 253, 1.000000);
		border-radius: 20rpx;
		width: 318rpx;
		height: 78rpx;
		border: 1px solid rgba(186, 186, 186, 1);
		flex-direction: row;
		display: flex;
		margin: 560rpx 0 18rpx 38rpx;
	}

	.icon_3 {
		background-color: rgba(255, 255, 255, 1.000000);
		border-radius: 20rpx;
		height: 78rpx;
		display: flex;
		flex-direction: column;
		width: 78rpx;
	}

	.label_1 {
		width: 78rpx;
		height: 78rpx;
	}

	.text_23 {
		width: 188rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1.000000);
		font-size: 32rpx;
		font-family: Helvetica, "Microsoft YaHei", Arial, sans-serif;
		font-weight: normal;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
		margin: 24rpx 36rpx 0 16rpx;
	}

	.box_4 {
		background-color: rgba(255, 255, 255, 1.000000);
		border-radius: NaNrpx;
		width: 750rpx;
		height: 428rpx;
		display: flex;
		flex-direction: column;
		margin: 1069rpx 0 0 -750rpx;
	}

	.section_8 {
		width: 628rpx;
		height: 94rpx;
		flex-direction: row;
		display: flex;
		margin: 34rpx 0 0 58rpx;
	}

	.text_24 {
		width: 108rpx;
		height: 36rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1.000000);
		font-size: 36rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 36rpx;
		margin-top: 30rpx;
	}

	.section_9 {
		width: 22rpx;
		height: 82rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 8rpx 0 0 24rpx;
	}

	.block_3 {
		margin-left: -150rpx;
		border-radius: 20rpx;
		width: 4px;
		height: 4px;
		border: 3px solid rgba(50, 148, 255, 1);
		display: flex;
		flex-direction: column;
	}

	.block_4 {
		margin-left: -150rpx;
		/* margin-top: -15rpx; */
		/* margin-bottom: -27rpx; */
		border-radius: 20rpx;
		height: 4px;
		width: 4px;
		border: 3px solid rgba(242, 132, 70, 1);
		margin-top: 38rpx;
		display: flex;
		flex-direction: column;
	}

	.section_10 {
		width: 256rpx;
		height: 94rpx;
		margin-left: 12rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.text-wrapper_6 {
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_25 {
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
		margin-right: 50px;

	}

	.text_26 {
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_27 {
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_28 {
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_29 {
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text_30 {
		margin-left: -145rpx;
		width: 256rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 32rpx;
	}

	.text-end {
		margin-left: -150rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1.000000);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		white-space: wrap;
		line-height: 32rpx;
		overflow: hidden;
		margin-top: 30rpx;
	}

	.text_31 {
		margin-left: -150rpx;
		width: 160rpx;
		height: 32rpx;
		overflow-wrap: break-word;
		color: rgba(61, 61, 61, 1.000000);
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: wrap;
		line-height: 32rpx;
		margin-top: 30rpx;
	}

	.icon_4 {
		border-radius: 100%;
		height: 64rpx;
		border: 3px solid rgba(233, 233, 233, 1);
		display: flex;
		flex-direction: column;
		width: 64rpx;
		margin: 12rpx 0 0 48rpx;
	}

	.thumbnail_1 {

		width: 36rpx;
		height: 36rpx;
		margin: auto;
		text-align: center;

	}

	/* 	.icon_5 {
		border-radius: 100%;
		height: 64rpx;
		border: 3px solid rgba(233, 233, 233, 1);
		display: flex;
		flex-direction: column;
		width: 64rpx;
		margin: 65rpx 0 0 40rpx;
	} */

	.label_2 {
		width: 46rpx;
		height: 46rpx;
		margin: auto;
	}

	.button_1 {
		background-color: rgba(50, 148, 255, 1.000000);
		border-radius: 20rpx;
		width: 688rpx;
		height: 160rpx;
		display: flex;
		flex-direction: row;
		margin: 52rpx 0 88rpx 32rpx;
		align-items: center;
	}

	.text-group_6 {
		width: 360rpx;
		height: 96rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 32rpx 0 0 164rpx;
	}

	.text-wrapper_7 {
		width: 360rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		color: rgba(255, 255, 255, 1.000000);
		font-size: 40rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 40rpx;
	}

	.text-wrapper_8 {
		width: 266rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		font-size: 0rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 40rpx;
		margin: 16rpx 0 0 48rpx;
	}

	.text_37 {
		width: 266rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		color: rgba(255, 255, 255, 1);
		font-size: 40rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 40rpx;
	}

	.text_38 {
		width: 266rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		color: rgba(255, 255, 255, 1);
		font-size: 40rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 40rpx;
	}

	.text_39 {
		width: 266rpx;
		height: 40rpx;
		overflow-wrap: break-word;
		color: rgba(255, 255, 255, 1);
		font-size: 40rpx;
		font-family: Source Han Sans CN-Medium;
		font-weight: 500;
		text-align: center;
		white-space: nowrap;
		line-height: 40rpx;
	}

	.pic_01 {
		height: 100%;
		width: 100%;
	}
</style>
<style>
	.button_style {
		margin-top: 3rem;
		background-color: #3294FF;
		color: white;
		border-radius: 2rem;
		width: 85%;
	}

	.xq_style {
		width: 90.5%;
		height: 100%;
		background-color: white;
		padding-top: 1rem;
		border-radius: 0.5rem;
		border: 1px solid #3294FF;
		padding: 1rem;

	}

	.xq_style view {
		height: 2.5rem;
		font-size: 0.8rem;
		line-height: 2.5rem;
	}

	.xq_style view view {
		letter-spacing: 0.1rem;
		float: left;
		/* width: 25%; */
	}

	.xq_style view input {
		color: #AAAAAA;
		float: left;
		width: 75%;
		height: 2.5rem;
		line-height: 2.5rem;
	}

	.bc {
		padding: 1rem;
		height: 100%;
		background-color: #EEEEEE;
	}

	.input_style {
		margin-top: 2.5rem;
		width: 100%;
		position: relative;
		margin-bottom: 1rem;
	}

	.input {
		background-color: white;
		border: 1px solid #3294FF;
		border-radius: 0.5rem;
		height: 4rem;
		padding-left: 0.8rem;
	}

	.yuan {
		position: absolute;
		top: 30%;
		right: 6%;
		font-size: 1.2rem;
	}

	.span_bc {
		width: 0.4rem;
		height: 1.3rem;
		background-color: #3294FF;
		border-radius: 0.5rem;
		float: left;
		position: relative;
		top: 0.2rem;
		margin-right: 0.5rem;
	}

	.border_style {
		padding-top: 0.3rem;
	}
</style>

<style lang="scss" scoped>
	@import 'css/drivingDetails.css';

	.map {
		width: 100%;
		height: 531px;
	}

	.processing {
		position: absolute;
		width: 100%;
		bottom: 60px;
		text-align: center;

		.user {
			margin-bottom: 10%;

			.item {
				margin-bottom: 10upx;
				font-size: 28upx;
				font-weight: 800;
			}

			.item1 {
				font-size: 24upx;
				color: #d2d2d2;
			}
		}

		button {
			border-radius: 0;
			background-color: #3294FF;
			font-size: 20px;
			height: 60px;
			line-height: 60px;

		}
	}

	.new {
		width: 100%;
		height: 100%;

		.start {
			width: 100%;
			border-radius: 0px;
			// background-color: #3294FF;
			height: 40pt;
			line-height: 40pt;
			border: none;
			position: absolute;
			margin-top: 10px;
			color: #fff;
			// bottom: 60px;
		}

		.start:after {
			border: none;
		}

		.user {
			flex-direction: column;
			width: 100%;
			display: flex;
			justify-content: center;
			// align-items: center;
			font-size: 28upx;

			image {
				width: 80upx;
				height: 80upx;
				border-radius: 50%;
			}

			.name {
				width: 40%;
				margin-left: 20upx;

				.item2 {
					font-size: 20upx;
				}
			}

			.phone {
				width: 40%;
				text-align: right;
			}
		}

		.money {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			font-size: 22upx;
			height: 200upx;
			color: #d2d2d2;

			text {
				margin-bottom: 10upx;
				color: #101010;
				font-size: 30upx;
			}
		}
	}

	.done {
		height: 100%;
		padding: 40upx;

		.top {
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 1px solid #dfdfdf;
			font-size: 26upx;
			padding: 20upx;

			.user {
				display: flex;
				align-items: center;

				image {
					width: 100upx;
					height: 100upx;
					border-radius: 50%;
					margin-right: 20upx;
				}
			}
		}

		.center {
			padding: 30upx 20upx;
			border-bottom: 1px solid #dfdfdf;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.input {
				font-size: 28upx;
				display: flex;
				align-items: center;

				.gray {
					margin: 20upx;
				}
			}
		}

		.money {
			display: flex;
			margin-top: 10%;
			width: 100%;
			flex-direction: column;
			align-items: center;
			justify-content: center;

			.t1 {
				font-size: 60upx;

				.yuan {
					font-size: 28upx;
				}
			}

			.t2 {
				font-size: 24upx;
				margin-top: 20upx;
			}

			.t3 {
				font-size: 28upx;
				margin-top: 5%;
			}
		}
	}

	.qrimg {
		text-align: center;
		padding: 40upx;
		height: 400upx;
	}
</style>